FROM php:7.4-apache

# 定义环境变量，设置时区时使用
ENV TIME_ZONE Asia/Shanghai
# RUN cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
RUN cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \
    && docker-php-ext-enable opcache sodium \
    # mysqli
    && docker-php-ext-install mysqli \ 
    # pgsql
    && apt-get update && apt-get install -y --no-install-recommends libpq-dev \
    # && apt-get install sqlite3 -y \
    && rm -r /var/lib/apt/lists/* \
    && docker-php-ext-install -j$(nproc) pgsql pdo pdo_pgsql

# ls /usr/local/lib/php/extensions/no-debug-non-zts-20200930/

# RUN docker-php-ext-install pdo_sqlite  
# RUN docker-php-ext-install -j$(nproc) pdo_sqlite  

# RUN echo "extension=sqlite3" >> "$PHP_INI_DIR/docker-php-ext-pdo_msql.ini" 
# RUN echo "extension=pdo_sqlite" >> "$PHP_INI_DIR/docker-php-ext-pdo_msql.ini" 

COPY src/ /var/www/html/
EXPOSE 80
# docker push nuget.weberp.com.cn/mydocker/php/navicat-ntunnel:latest